package com.weixin.dao;

import java.sql.SQLException;
import java.util.List;

import org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReport;

import com.weixin.entity.Goods;

public interface IGoodsDao {
	/**
	 * 得到所有，未分页
	 * @return
	 * @throws SQLException
	 */
	public List<Goods> getAll() throws SQLException;
	/**
	 * 查找所有商品信息
	 * @return
	 * @throws SQLException
	 */
	public List<Goods> selectAll(int pageSize,int pageNum) throws SQLException;
	/**
	 * 所有商品总个数
	 * @return
	 * @throws SQLException
	 */
	public int selectAllTotal()throws SQLException;
	/**
	 * 根据编号查找商品信息
	 * @param goods_id
	 * @return
	 * @throws SQLException
	 */
	public Goods selectById(int goods_id) throws SQLException;
	
	/**
	 * 添加商品信息
	 * @param goods
	 * @return
	 * @throws SQLException
	 */
	public boolean insertGoods(Goods goods)throws SQLException;
	
	/**
	 * 更改商品信息
	 * @param goods
	 * @return
	 * @throws SQLException
	 */
	public boolean updateGoods(Goods goods)throws SQLException;
	
	/**
	 * 根据商品编号删除商品
	 * @param goods_id
	 * @return
	 * @throws SQLException
	 */
	public boolean deleteById(int goods_id)throws SQLException;
	
	/**
	 * 根据商品名称模糊查询商品信息
	 * @param goods_name
	 * @return
	 * @throws SQLException
	 */
	public List<Goods> selectByName(String goods_name)throws SQLException;
	
	/**
	 * 根据商品分类查找商品信息，模糊查询
	 * @param goods_classification
	 * @return
	 * @throws SQLException
	 */
	public List<Goods> selectByClass(String goods_classification)throws SQLException;
	
	/**
	 * 根据编号可模糊查询商品
	 * @param goods_id
	 * @return
	 * @throws SQLException
	 */
	public List<Goods> selectByGoodsId(int goods_id) throws SQLException;
	/**
	 * 得到伪删除的所有信息
	 * @param pageSize
	 * @param pageNum
	 * @return
	 * @throws SQLException
	 */
	public List<Goods> getAllForRegain(int pageSize,int pageNum) throws SQLException;
	/**
	 * 根据id恢复伪删除的信息
	 * @param goods_id
	 * @return
	 * @throws SQLException
	 */
	public boolean regainById(int goods_id)throws SQLException;
	/**
	 * 根据id彻底删除商品信息
	 * @param goods_id
	 * @return
	 * @throws SQLException
	 */
	public boolean trueDeleteById(int goods_id)throws SQLException;
	/**
	 * 得到伪删除的总数据条数
	 * @return
	 * @throws SQLException
	 */
	public int getTotalForRegain()throws SQLException;
}
